<?
if (!isset($r)) $r = "../";

require_once($r."_engine/types.php");
require_once($r."_engine/c_account.php");
require_once($r."_engine/functions.php");
$account = GetActiveAccount();


if (@$do_update)
{
	$f_def_highlight_font_style = 0x00;
	foreach ($g_highlight_font_style_map as $k => $name)
	{
		$t = 'f_hl_fs_'.$k;
		if (isset($$t)) $f_def_highlight_font_style |= $k;
	}

	set_if_null($f_def_disable_top_list_stats, 0);
	set_if_null($f_def_alert_sms, 0);

	get_form_values($values, array(
		"def_frequency",
		"def_highlight_font_color", "def_highlight_bk_color", "def_highlight_font_style",
		"def_disable_top_list_stats",
		"def_alert_format", "def_alert_emails", "def_alert_sms",
		"view_max_size",
		"timezone_offset",
	));

	$account->Update($values);

	generate_html_redirect("dashboard.php");
}
?>